<template>
  <div class="leftTool">
    <el-collapse v-model="activeNames" @change="handleChange">
      <el-collapse-item
        v-for="(item, index) of leftConfig"
        :key="index"
        :name="item.name"
      >
        <template slot="title">
          <p class="leftTool-collapse-title">{{ item.title }}</p>
        </template>
        <y-form @formChange="change" :formConfig="item.formConfig" :modelValue="$attrs.options" />
      </el-collapse-item>
    </el-collapse>
  </div>
</template>

<script>
// 配置想取值的统一方法
import toolMixin from "@/modules/echartTools/views/rightTools/toolMixins.js";
export default {
  mixins: [toolMixin],
};
</script>

<style lang="scss" scoped>
.leftTool {
  height: 100%;
  overflow: hidden;
  overflow-y: auto;
  &-collapse-title {
    padding: 0 20px;
    width: 100%;
  }
}
</style>